import 'package:demo/util/asset.dart';
import 'package:flutter/material.dart';
import 'banner.dart';
import 'totalDetail.dart';

class TotalPageWidget extends StatefulWidget {
  @override
  TotalPageWidgetState createState() => new TotalPageWidgetState();
}

class TotalPageWidgetState extends State<TotalPageWidget> {
  String title;
  bool isTab = false;
  void initData() {
    isTab = SpUtil.preferences.getBool('isTab');
    title = SpUtil.preferences.getString('totalType');
  }

  @override
  Widget build(BuildContext context) {
    initData();

    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Column(
        children: [
          BannerCom(),
          Expanded(
            child: TotalDetailCom(),
          ),
          Container(
            height: 20.0,
          )
        ],
      ),
    );
  }
}
